package ch.fusun.baron.player;

import ch.fusun.baron.core.injection.Inject;
import ch.fusun.baron.data.DataUpdate;
import ch.fusun.baron.player.api.CountryService;

/**
 * Creates a country
 */
public class CreateCountryDataUpdate implements DataUpdate {
	@Inject
	private transient CountryService countryService;
	private String name;

	/**
	 * Kryo
	 */
	public CreateCountryDataUpdate() {
	}

	/**
	 * @param name
	 *            The name of the country
	 */
	public CreateCountryDataUpdate(String name) {
		this.name = name;
	}

	@Override
	public void update() {
		countryService.createCountry(name);

	}

}
